String Functions
Description
Utility functions for working with JavaScript strings.
- Name
- Description
- $u.s.aTrim Function
Trim the both sides of a string, removing spaces and any passed in characters.
- $u.s.changeCase Function
Change the case of a string.
- $u.s.lTrim Function
Trim the left of a string, removing spaces and any passed in characters.
- $u.s.pad
Pad a string with a passed in padding string. Optionally choose where the padding should be positioned.
- $u.s.replicate Function
Duplicate a string a given number of times.
- $u.s.rTrim Function
Trim the right of a string, removing spaces and any passed in characters.
- $u.s.toBool Function
Convert a string into a logical. If a string is one of the following values (case insensitive), it is converted to true: true, t, yes, 1, .t.. Any other value is false.
- $u.s.toNum Function
Convert a string into a number. Non-numeric characters are stripped out. The default thousands separator is a comma and decimal separator is a period. However, you can specify the values to use by setting $u.decimal and $u.comma.
- $u.s.tran Function
Replace single or multiple strings in a string.
- $u.s.word Function
Fetch a given word from a string, based on a separator (the default separator is a space).